package com.cloud.adrian.novel.book.dto.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 小说章节响应dto
 * @Author: xiangguiliang
 * @version: 1.0
 * @since: 2024/05/22
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class BookChapterRespDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "章节id")
    private Long id;

    @Schema(description = "小说id")
    private Long bookId;

    @Schema(description = "章节号")
    private Integer chapterNum;

    @Schema(description = "章节名")
    private String chapterName;

    @Schema(description = "章节字数")
    private Integer chapterWordCount;

    @Schema(description = "章节更新时间")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime chapterUpdateTime;

    @Schema(description = "时候收费;0-免费 1-收费")
    private Integer isVip;
}
